home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 19
/
Amiga Plus Leser CD 19.iso
/
Online
/
AmigaTalk
/
intuition
/
SetupIntuition.st
< prev
next >
Wrap
Text File
|
2002-03-24
|
4KB
|
134 lines
" ------------------------------------------------------------------- "
" Intuition Class is a Singleton class that allows the user to "
" reference intuition-specific singleton classes in one spot. "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class Intuition :Dictionary
! uniqueInstance gadgetAttrs gadgetFlags gadgetTypes gadToolsAttrs
gadgetActs gadgetMethodIDs idcmpFlags screenTags windowFlags
windowTags specialTags icClass methodIDs imageTags
menuFlags reqFlags boopsiNames iconTags iconTypeTags
workbenchTags workbenchFlags appMsgTags
!
[
isSingleton
^ true
|
privateNew ! newInstance !
newInstance <- super new.
^ newInstance
|
new
^ (self privateSetup)
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
iconTags <- IconTags new.
iconTypeTags <- IconTypeTags new.
workbenchTags <- WorkbenchTags new.
workbenchFlags <- WorkbenchFlags new.
appMsgTags <- AppMsgTags new.
specialTags <- SpecialTags new.
"BOOPSI tag Singleton classes:"
icClass <- ICClass new.
methodIDs <- MethodIDs new.
imageTags <- ImageTags new.
boopsiNames <- BoopsiClassNames new.
"Initialize all Intuition Singleton classes:"
gadToolsAttrs <- GadToolsAttributes new.
gadgetAttrs <- GadgetAttributes new.
gadgetMethodIDs <- GadgetMethodIDs new.
gadgetFlags <- GadgetFlags new.
gadgetTypes <- GadgetTypes new.
gadgetActs <- GadgetActivation new.
screenTags <- ScreenTags new.
windowTags <- WindowTags new.
windowFlags <- WindowFlags new.
idcmpFlags <- IDCMPFlags new.
menuFlags <- MenuFlags new.
reqFlags <- RequesterFlags new.
].
^ self "uniqueInstance??"
|
getBoopsiClassName: key
^ boopsiNames at: key
|
getRequesterFlag: key
^ reqFlags at: key
|
getWorkbenchTag: key
^ workbenchTags at: key
|
getWorkbenchFlag: key
^ workbenchFlags at: key
|
getAppMsgTag: key
^ appMsgTags at: key
|
getMenuFlag: key
^ menuFlags at: key
|
getIconTag: key
^ iconTags at: key
|
getIconTypeTag: key
^ iconTypeTags at: key
|
getSpecialTag: key
^ specialTags at: key
|
getImageTag: key
^ imageTags at: key
|
getICClass: key
^ icClass at: key
|
getMethodID: key
^ methodIDs at: key
|
getGadgetAttr: key
^ gadgetAttrs at: key
|
getGadToolAttr: key
^ gadToolsAttrs at: key
|
getGadgetFlag: key
^ gadgetFlags at: key
|
getGadgetType: key
^ gadgetTypes at: key
|
getGadgetMethodID: key
^ gadgetMethodIDs at: key
|
getGadgetActivation: key
^ gadgetActs at: key
|
getScreenTag: key
^ screenTags at: key
|
getWindowTag: key
^ windowTags at: key
|
getIDCMPFlag: key
^ idcmpFlags at: key
|
getWindowFlag: key
^ windowFlags at: key
]